<template>
  <div class="mask" v-if="isShow" :style="style"></div>
</template>

<script>
export default {
  props: {
    isShow: {
      type: Boolean
    }
  },
  data() {
    return {
      zIndex: 990
    }
  },
  computed: {
    style() {
      return {
        zIndex: this.zIndex + 1
      }
    }
  }
}
</script>

<style lang="less">
.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}
</style>
